package com.haogu.pojo;
// 封装常用的一些
public enum ResultEnum implements IResult {
    SUCCESS(200, "接口调用成功"),
    DELETE_SUCCESS(200,"删除成功"),
    INSERT_SUCCESS(200,"添加成功"),
    UPDATE_SUCCESS(200,"修改成功"),
    SELECT_SUCCESS(200,"查询成功"),
    VALIDATE_FAILED(2002, "参数校验失败"),
    COMMON_FAILED(2003, "接口调用失败"),
    FORBIDDEN(2004, "没有权限访问资源"),
    DELETE_ERROR(2005,"删除失败"),
    UPDATE_ERROR(2006,"修改失败"),
    INSERT_ERROR(2007,"添加失败");
    private Integer code;
    private String message;

    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}